package com.finance.capacity.coefficientTrend.request;

import com.finance.base.constant.PatternConstants;
import com.finance.framework.lang.PageReq;
import com.finance.framework.lang.valid.EnumValid;
import com.finance.util.DateUtil;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.text.ParseException;
import java.util.Date;

/**
 * Created by ljg on 2017/3/24.
 */
@Data
public class CoeTrendReq extends PageReq implements Serializable {

    private String provinceId;

    private  String cityId;

    private  String siteId;

    private  String keyWords;

    private String beginTime;

    private String endTime;

    private String relationId;

    public Date convertStartTime() throws ParseException {
        if(this.beginTime!=null){
            return DateUtil.str2date(this.beginTime);
        }
        return null;
    }
    public Date convertEndTime() throws ParseException {
        if(this.endTime!=null){
            return DateUtil.str2date(this.endTime);
        }
        return null;
    }
}
